package com.sap.tpcd.policybuilder.policymodel;

/**
 * @author Bouanani Meher
 * @version 1.0
 * @created 30-sept.-2011 14:12:33
 */
public class Action {

	private String name;
	private Object resultType;

	public Action() {
		super();
	}

	public Action(String name, Object resultType) {
		super();
		this.name = name;
		this.resultType = resultType;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Object getResultType() {
		return resultType;
	}

	public void setResultType(Object resultType) {
		this.resultType = resultType;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		result = prime * result
				+ ((resultType == null) ? 0 : resultType.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj == null) {
			return false;
		}
		if (!(obj instanceof Action)) {
			return false;
		}
		Action other = (Action) obj;
		if (name == null) {
			if (other.name != null) {
				return false;
			}
		} else if (!name.equals(other.name)) {
			return false;
		}
		if (resultType == null) {
			if (other.resultType != null) {
				return false;
			}
		} else if (!resultType.equals(other.resultType)) {
			return false;
		}
		return true;
	}

}